home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / varia / gc-nov90.lha / gc-26nov90 / mips.s < prev    next >
Text File  |  1990-11-21  |  3KB  |  70 lines

  1. /*
  2.  * Mostly copying garbage collector for C++.
  3.  *
  4.  *
  5.  *              Copyright 1990 Digital Equipment Corporation
  6.  *                         All Rights Reserved
  7.  *
  8.  * Permission to use, copy, and modify this software and its documentation is
  9.  * hereby granted only under the following terms and conditions.  Both the
  10.  * above copyright notice and this permission notice must appear in all copies
  11.  * of the software, derivative works or modified versions, and any portions
  12.  * thereof, and both notices must appear in supporting documentation.
  13.  *
  14.  * Users of this software agree to the terms and conditions set forth herein,
  15.  * and hereby grant back to Digital a non-exclusive, unrestricted, royalty-free
  16.  * right and license under any changes, enhancements or extensions made to the
  17.  * core functions of the software, including but not limited to those affording
  18.  * compatibility with other hardware or software environments, but excluding
  19.  * applications which incorporate this software.  Users further agree to use
  20.  * their best efforts to return to Digital any such changes, enhancements or
  21.  * extensions that they make and inform Digital of noteworthy uses of this
  22.  * software.  Correspondence should be provided to Digital at:
  23.  * 
  24.  *                       Director of Licensing
  25.  *                       Western Research Laboratory
  26.  *                       Digital Equipment Corporation
  27.  *                       100 Hamilton Avenue
  28.  *                       Palo Alto, California  94301  
  29.  * 
  30.  * This software may be distributed (but not offered for sale or transferred
  31.  * for compensation) to third parties, provided such third parties agree to
  32.  * abide by the terms and conditions of this notice.  
  33.  * 
  34.  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  35.  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  36.  * MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
  37.  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  38.  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  39.  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  40.  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  41.  * SOFTWARE.
  42.  */
  43.  
  44. /* gcregisters stores the values of s0-s8 in the caller supplied buffer and
  45.    returns the current top-of-stack.  The saved register set is the set of
  46.    "callee" save registers which need to be examined during garbage
  47.    collection. 
  48. */
  49.  
  50. #include <mips/regdef.h>
  51.  
  52.     .text    
  53.     .align    2
  54.     .globl    gcregisters
  55.     .ent    gcregisters
  56. gcregisters:
  57.     .frame    sp, 0, ra
  58.     sw    s0, 0(a0)    /* Save s0-s8 */
  59.     sw    s1, 4(a0)
  60.     sw    s2, 8(a0)
  61.     sw    s3, 12(a0)
  62.     sw    s4, 16(a0)
  63.     sw    s5, 20(a0)
  64.     sw    s6, 24(a0)
  65.     sw    s7, 28(a0)
  66.     sw    s8, 32(a0)
  67.     or    v0, sp, 0    /* Return top-of-stack address */
  68.     j    ra
  69.     .end    gcregisters
  70.